package top.jidanmin.demo.lightserver.device;

import org.springframework.web.bind.annotation.RestController;

import jakarta.annotation.Resource;

import java.util.List;

import org.springframework.web.bind.annotation.GetMapping;


@RestController
public class DeviceController {
    
    @Resource
    private DeviceService deviceService;

    @GetMapping("/devices")
    public List<Device> listAll() {
        return deviceService.findAll();
    }
    
}
